package com.xiaofeng.Hello;

public class Java12 {
    public static void main(String[] args) {
        //招质数
        int n=0;
        for (int i = 1; i < 100; i++) {
            int flag=1;
            for(int j=2;j<i;j++){
                if(i%j==0) { flag=0;
                   break;
                }
            }
            if(i!=1&&flag==1) { System.out.println(i + "是质数");
                n++;
            }
        }
        System.out.println("共有"+n+"个质数");
    }
}
